package com.woniu.command.handler;

import com.woniu.adapter.WorkerAdapter;
import com.woniu.outlet.po.WorkerPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WorkerCommandHandler {

    @Autowired
    private WorkerAdapter workerAdapter;



    public boolean addWorker(WorkerPo workerPo){
        boolean b = workerAdapter.addWorker(workerPo);
        return b;
    }

    public Integer updateWorker(WorkerPo workerPo){
        workerAdapter.updateWorker(workerPo);
        return 1;
    }

    public Integer deleteWorkerById(Long id){
        workerAdapter.deleteWorkerById(id);
        return 1;
    }


}
